Conversation
…ent worktrees Codex sessions now return to repo root and run worktree cleanup on exit, so finished clean agent branches disappear automatically instead of piling up in VS Code Source Control.\n\nPrune now infers base branch when omitted, preserves dirty worktrees by default, and adds a force flag for explicit cleanup. Documentation and tests were updated to match the GuardeX workflow and protect against regressions. Constraint: Users keep their local checkout on main/dev while Codex works in isolated agent/* branches\nRejected: Force-delete every agent worktree on exit | risks data loss for dirty/unmerged work\nConfidence: high\nScope-risk: moderate\nReversibility: clean\nDirective: Keep dirty-worktree preservation as default safety behavior; only remove with --force-dirty\nTested: npm test\nTested: node --check bin/multiagent-safety.js\nNot-tested: Manual VS Code Source Control screenshot validation after a full PR merge loop
c86e707 to
cd2f84e
Compare
Collaborator
Author
|
Superseded by #33 (merged on April 11, 2026), which carries the finalized auto-prune + protected-main workflow updates. Closing this duplicate path. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary\n- auto-run worktree cleanup when exits\n- make infer base branch automatically and preserve dirty worktrees by default\n- add for explicit destructive cleanup\n- update setup script wiring, README docs, and install tests\n\n## Why\nAgent branches/worktrees were lingering in VS Code Source Control even after sessions ended, especially when users kept their local checkout on . This keeps the preferred local branch clean while still using isolated agent branches.\n\n## Verification\n- npm test\n- node --check bin/multiagent-safety.js\n